<?php

	require("header.php");
	require("table_des_matieres.php");

if (isset($success))
{
	echo '<fieldset>
	<legend>'.$language[$_SESSION['lang']]["Success"].'</legend>
	'.$language[$_SESSION['lang']]["SuccessRegister"].'.
	</fieldset>';
	
}

if (isset($addedAgreements))
{
	echo '<fieldset>
	<legend>'.$language[$_SESSION['lang']]["Success"].'</legend>
	'.$language[$_SESSION['lang']]["WaitingAgreeAdded"].'.
	</fieldset>';
}

if (isset($existsLogin))
{
	echo '<fieldset>
	<legend>'.$language[$_SESSION['lang']]["Error"].'</legend>	
	'.$language[$_SESSION['lang']]["LoginUsed"].'
	</fieldset>';
}

if (isset($existsMail))
{
	echo '<fieldset>
<legend>'.$language[$_SESSION['lang']]["Error"].'</legend>	
'.$language[$_SESSION['lang']]["MailUsed"].'
</fieldset>';
}

if (isset($phoneError))
{
	echo '<fieldset>
<legend>'.$language[$_SESSION['lang']]["Error"].'</legend>
'.$language[$_SESSION['lang']]["PhoneError"].'
</fieldset>';
}

if (isset($notEqualsPwd))
{
	echo '<fieldset>
<legend>'.$language[$_SESSION['lang']]["Error"].'</legend>
'.$language[$_SESSION['lang']]["PasswordsError"].'
</fieldset>';
}

?>

</fieldset>

<form action="" method="POST" enctype="multipart/form-data">

		
					<input type="hidden" name="e-mail" value="">	
					
			<fieldset id="coordonnee">
			<legend><?php echo $language[$_SESSION['lang']]["Register"]; ?></legend>
			
		<p>
				<label class = "text" for="civilite">Civilit&eacute;:</label>				
				<input class = "text" type="radio" name="civilite" value="M" /> <label for="M"><?php echo $language[$_SESSION['lang']]["Mr"]; ?></label>
				<input class = "text" type="radio" name="civilite" value="Mme" /> <label for="Mme"><?php echo $language[$_SESSION['lang']]["Mme"]; ?></label>


		</p>	
			
	
		<p>
				<label class="text" for='name'><?php echo $language[$_SESSION['lang']]["Defaultname"]; ?></label>
				<input class="text" type= "text"  name="name"  value= "<?php echo echoValue($language,"name","POST"); ?>" />
		</p> 	 
		<p>
		 
				<label class="text" for='surname'><?php echo $language[$_SESSION['lang']]["Defaultsurname"]; ?></label>
				<input class="text" type="text"   name="surname"	value= "<?php echo echoValue($language,"surname","POST"); ?>" />
			 
		</p>
		
		<p>
				<label class="text" for='login'><?php echo $language[$_SESSION['lang']]["Defaultlogin"]; ?></label>
				<input class="text" type="text"   name="login"		value="<?php echo echoValue($language,"login","POST"); ?>" />
		
		</p>
		
		<p>
			<table>
				<tr>
					<td><label class ="text" for = "date"><?php echo $language[$_SESSION['lang']]["DateOfBirth"]; ?></label> </td>
						
					<td><label class = "text" for = "jour"><?php echo $language[$_SESSION['lang']]["Day"]; ?></label></td>
					<td>
						<select name = "jour">
						<option value="0"> </option>
						<?php
						
							for ($i = 1; $i <= 31; $i++)
							{
								echo '<option value="'.$i.'">'.$i.'</option>';
							}
							
						?>
						</select>
					</td>
					<td><label class = "text" for = "mois"><?php echo $language[$_SESSION['lang']]["Month"]; ?></label></td>
					<td>
						<select name = "mois">
						<option value="0"> </option>
						<?php
						
							for ($i = 1; $i <= 12; $i++)
							{
								echo '<option value="'.$i.'">'.$i.'</option>';
							}
							
						?>
						</select>
					</td>
					<td>&ensp;<label class = "text" for = "annee"><?php echo $language[$_SESSION['lang']]["Year"]; ?></label></td>
					<td>
						<select name = "annee">
						<option value="0"> </option>
						<?php
						
							for ($i = 0; $i <= 120; $i++)
							{
								echo '<option value="'.intval(date("Y",time())-$i).'">'.intval(date("Y",time())-$i).'</option>';
							}
							
						?>
						</select>
					</td>
				</tr>
			
			</table>
		
		</p> 
		
		<?php require("adresse.php"); ?>
		
		<p>
					<label class = "text" for "telephone"><?php echo $language[$_SESSION['lang']]["Phone"]; ?></label>
					<input class = "text" type = "text" name = "telephone" value="<?php if (isset($_POST['telephone'])) { echo $_POST['telephone']; } ?>" />
		</p>
		<p>
					<label class = "text" for "mobile"><?php echo $language[$_SESSION['lang']]["Mobile"]; ?></label></label>
					<input class = "text" type = "text" name = "mobile" value="<?php if (isset($_POST['telephone'])) { echo $_POST['mobile']; } ?>" />
		</p>
		<p>
				<label class="text" for='mail'><?php echo $language[$_SESSION['lang']]["Defaultmail"]; ?></label>
				<input class="text" type= "text"  name="mail"   value = "<?php if (isset($_POST['telephone'])) { echo $_POST['mail']; } ?>" />
		</p>
		<p>
				<label class = "text" for="langue"><?php echo $language[$_SESSION['lang']]["WantedLanguage"]; ?></label>				
				<input class = "text" type="radio" name="langue" value="1" /> <label for="Français"><?php echo $language[$_SESSION['lang']]["French"]; ?></label>
				<input class = "text" type="radio" name="langue" value="2" /> <label for="Anglais"><?php echo $language[$_SESSION['lang']]["English"]; ?></label>


		</p>	
		<p>
		 
				<label class="text" for='pmdp'><?php echo $language[$_SESSION['lang']]["Password"]; ?></label>
				<br /><input class="text" type= "password"  name="mdp"   value = "" />
		</p>	 
		
		<p>
				<label class="text" for='verifmdp'><?php echo $language[$_SESSION['lang']]["VerifyPassword"]; ?></label> 
				<br/><input class="text" type= "password"  name="verifmdp"   value = "" />
			 
		</p>	
	
		</fieldset>
		
		<p class="envoy">
			<input id="validSearch" type="submit" name="valider" value="<?php echo $language[$_SESSION['lang']]["Valid"]; ?>" />
			<input type="reset" value="<?php echo $language[$_SESSION['lang']]["Erase"]; ?>" />
		</p>
	
</form>

<?php

	require("footer.php");

?>
